<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/components/download.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\index.html">All files</a> / <a href="index.html">src/components</a> download.vue
    </h1>
    <div class='clearfix'>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
  &lt;div&gt;
    &lt;img class="logo" src="/static/img/down.png" alt=""&gt;
    &lt;p&gt;请前往蜂巢影视联盟APP &lt;/p&gt;
    &lt;p&gt;继续为您支持的主播投票&lt;/p&gt;
    &lt;div @click="downLoadApp" class="btn"&gt;立即前往&lt;/div&gt;
  &lt;/div&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
<span class="cstat-no" title="statement not covered" >import { Toast } from 'vant';</span>
export default {
  name: 'download',
<span class="fstat-no" title="function not covered" >  data() {</span>
<span class="cstat-no" title="statement not covered" >    return {</span>
      env: '',
      iosUrl: 'https://apps.apple.com/cn/app/%E8%9C%82%E5%B7%A2%E5%BD%B1%E8%A7%86%E8%81%94%E7%9B%9F/id1568825575?l=en',
      androidUrl: 'https://a.app.qq.com/o/simple.jsp?pkgname=com.lucky.luckyclient',
    }
  },
<span class="fstat-no" title="function not covered" >  created() {</span>
<span class="cstat-no" title="statement not covered" >    this.$emit('footer', false);</span>
<span class="cstat-no" title="statement not covered" >    this.getNowEnv()</span>
  },
  methods: {
    //根据环境下载或者唤醒
<span class="fstat-no" title="function not covered" >    downLoadApp() {</span>
<span class="cstat-no" title="statement not covered" >      let _this = this</span>
<span class="cstat-no" title="statement not covered" >       Toast('准备下载')</span>
      //浏览器
<span class="cstat-no" title="statement not covered" >      if (this.env == 1) {</span>
<span class="cstat-no" title="statement not covered" >        window.location.href = 'android://com.lc.caixuyingshi/home'</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        setTimeout(function () {</span></span>
<span class="cstat-no" title="statement not covered" >          let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden || window.document.webkitHidden</span>
<span class="cstat-no" title="statement not covered" >          if (typeof hidden == "undefined" || hidden == false) {</span>
<span class="cstat-no" title="statement not covered" >            window.location.href = _this.androidUrl</span>
          }
        }, 1500);
<span class="cstat-no" title="statement not covered" >      } else if (this.env == 2) {</span>
<span class="cstat-no" title="statement not covered" >        window.location.href = 'https://81beea3ae2d151792195f3859d3d968b.share2dlink.com/'</span>
        // window.location.href = 'ShanXiAppcaixuyingshi://'
        // setTimeout(function () {
        //   let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden || window.document.webkitHidden
        //   if (typeof hidden == "undefined" || hidden == false) {
        //     window.location.href = _this.iosUrl
        //   }
        // }, 1500);
      }
    },
    //判断环境
<span class="fstat-no" title="function not covered" >    getNowEnv() {</span>
      //判断环境
<span class="cstat-no" title="statement not covered" >      let u = navigator.userAgent,</span>
        isAndroid = u.indexOf('Android') &gt; -1 || u.indexOf('Adr') &gt; -1,//android终端
<span class="cstat-no" title="statement not covered" >        isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),//ios</span>
<span class="cstat-no" title="statement not covered" >        isWx = !!u.match(/MicroMessenger/i);//微信</span>
<span class="cstat-no" title="statement not covered" >      if (isWx) {</span>
<span class="cstat-no" title="statement not covered" >        Toast('微信')</span>
<span class="cstat-no" title="statement not covered" >        this.isWx = true</span>
      }
<span class="cstat-no" title="statement not covered" >      if (isAndroid) {</span>
<span class="cstat-no" title="statement not covered" >        Toast('安卓')</span>
<span class="cstat-no" title="statement not covered" >        this.env = 1</span>
      }
<span class="cstat-no" title="statement not covered" >      if (isiOS) {</span>
<span class="cstat-no" title="statement not covered" >        Toast('苹果')</span>
<span class="cstat-no" title="statement not covered" >        this.env = 2</span>
      }
    }
  },
<span class="fstat-no" title="function not covered" >  mounted() {</span>
&nbsp;
  }
&nbsp;
}
&lt;/script&gt;
&nbsp;
&lt;style  scoped&gt;
.logo {
  display: block;
  width: 85%;
  margin: 150px auto 20px;
}
p {
  color: #fff;
  font-size: 20px;
  text-align: center;
  margin-bottom: 5px;
}
.btn {
  width: 85%;
  margin-top: 50px;
  background: #fc6e20;
  border-radius: 61px;
  line-height: 36px;
  font-size: 18px;
  text-align: center;
  color: #fff;
}
&lt;/style&gt;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Nov 27 2023 23:16:11 GMT+0800 (GMT+08:00)
</div>
</div>
<script src="..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\sorter.js"></script>
</body>
</html>
